<!--
 * @Author: liuyonghu
 * @Date: 2021-12-08 16:22:06
 * @LastEditTime: 2021-12-17 17:20:11
 * @LastEditors: liuyonghu
 * @Description: 
 * @FilePath: /demos/autoplay/index.html
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body onmouseover="myclick(12)">
    <div
      onclick="myclick()"
      style="
        background-color: red;
        box-shadow: 0 12px 12px lightgray;
        width: 100px;
        height: 100px;
      "
    >
      123
    </div>

    <object data="./sound.mp3"></object>
    <script>
    
    //   const audioE = document.createElement('audio');
    //   audioE.src = './sound.mp3';
    //   //   audioE.muted = true;
    //   //   audioE.autoplay = true;
    //   audioE.onended = () => {
    //     console.log('sdddd');
    //     // audioE.muted = false;
    //     // audioE.play();
    //   };
    //   audioE.onload = () => {
    //     console.log(' load ');
    //   };
    //   function myclick(p) {
    //     audioE.play();
    //     console.log(' click ', p);
    //   }
    //   //   const image1 = new Image();
    //   const audio1 = new Audio();
    //   audio1.src = './sound.mp3';
    //   audio1.onload = () => {
    //     console.log(' load 1 ');
    //   };
    //   myclick();
      //   setInterval(() => {
      //     myclick();
      //   }, 15000);
    </script>
  </body>
</html>
